package com.dhcc.bpm.modules.safe.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

import java.math.BigDecimal;

/**
 * @ClassName Flow
 * @Description 流量管理表实体类
 * @Author daina
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Data
@TableName("opc_flow")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Flow对象", description = "流量管理表")
public class Flow extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 应用/渠道ID
     */
    @ApiModelProperty(value = "应用/渠道ID")
    private String opcAppId;
    /**
     * APIID
     */
    @ApiModelProperty(value = "接口编号")
    private String opcApiId;
    /**
     * 流控周期
     */
    @ApiModelProperty(value = "流控周期")
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private Integer flowControlCycle;
    /**
     * 流控时间（单位为秒）
     */
    @ApiModelProperty(value = "流控时间")
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private Integer flowControlSeconds;
    /**
     * 流控时间
     */
    @ApiModelProperty(value = "流控类型")
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private String flowType;
    /**
     * 短信水位
     */
    @ApiModelProperty(value = "短信水位")
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private BigDecimal messageWarningLevel;
    /**
     * 预警水位
     */
    @ApiModelProperty(value = "预警水位")
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private BigDecimal warningLevel;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
//    @TableField(value = "`describe`")
    private String describe;
    /**
     * 每日限流值
     */
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private Long flowValue;
    /**
     * 每秒并发数
     */
    @JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
    private Long flowQps;

    /**
     * 环境
     */
    @ApiModelProperty(value = "环境")
    private String env;

    /**
     * 网关
     */
    @ApiModelProperty(value = "网关")
    private String gatewayCode;

    /**
     * 网关类型
     */
    @ApiModelProperty(value = "网关类型")
    private String gatewayType;

    /**
     * 刷新状态
     */
    @ApiModelProperty(value = "刷新状态")
    private String refreshStatus;
    /**
     * 启停标志
     */
    @ApiModelProperty(value = "启停标志")
    private String useFlag;

    /**
     * 限流后处理方式
     */
    @ApiModelProperty(value = "限流后处理方式")
    private String rateLimitHandle;

//    /**
//     * 导出数据标识
//     */
//    @ApiModelProperty(value = "导出数据标识")
//    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
//    private String expSeq;
}
